#ifndef LICENSINGUSERINFO_H
#define LICENSINGUSERINFO_H

#include <QString>
#include <QDateTime>
#include <QList>
#include <QDomDocument>



/*
 *
 *  IMPORTANT!
 *  for the public key size and algorithm chosen the maximal message size is 214 !!!
 *  Keep message short or widen the key or introduce long messages support
 *
 */



class LicensingUserInfo
{
public: //classes

	typedef QList<QString> MacAddrCollection;

public:
    LicensingUserInfo();

	QString hostName() const { return _hostName; }
	void setHostName(const QString& value) { _hostName = value; }

	QString OSName() const { return _OSName; }
	void setOSName(const QString& value) { _OSName = value; }

	QString userName() const { return _userName; }
	void setUserName(const QString& value) { _userName = value; }

	QDateTime timeUtc() const { return _timeUtc; }
	void setTimeUtc(const QDateTime& value) { _timeUtc = value; }

	const MacAddrCollection& macAddresses() const { return _macAddresses; }
	MacAddrCollection& macAddresses() { return _macAddresses; }

	void writeTo(QDomDocument& doc) const;
	void readFrom(const QDomDocument& doc);


private: //fields

	QString _hostName;
	QString _OSName;  // what about x32 and x64?
	QString _userName;
	QDateTime _timeUtc;
	MacAddrCollection _macAddresses;
};

#endif // LICENSINGUSERINFO_H
